package com.jackrain.nea.ext.permission;

import com.google.common.base.Objects;
import lombok.Data;

import java.io.Serializable;

/**
 * 配销中心权限（Distrib），品牌权限（Brand）
 *
 * @Author yangxy
 * @Date Create in 13:46 2017-12-22
 * @Description:
 * @Modified by:
 */
@Data
public class DataPermissionModel implements Serializable {


    private static final long serialVersionUID = -8307840531422748349L;
    /**
     * distribId or brandId
     */
    private Long id;
    /**
     *
     */
    private String ename;

    private String ecode;

    private String isRead;
    private String isWrite;

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        DataPermissionModel p = (DataPermissionModel) o;
        return Objects.equal(id, p.id);
    }


    @Override
    public int hashCode() {
        return Objects.hashCode(id);
    }

}
